home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / recio202.zip / spec.txt < prev    next >
Text File  |  1994-05-05  |  71KB  |  2,340 lines

  1.     Title: SPECIFICATION OF C LANGUAGE RECIO LIBRARY
  2. Copyright: (C) 1994 William Pierpoint
  3.   Version: 2.02
  4.      Date: May 5, 1994
  5.  
  6.  
  7.  
  8. 1.0 RECORD INPUT/OUTPUT <recio.h>
  9.  
  10.  
  11. 1.1 Introduction
  12.  
  13. The header <recio.h> declares one type, several macros, and many functions
  14. for performing line oriented input and output.
  15.  
  16.  
  17. 1.1.1 Record Streams
  18.  
  19. Input and output are mapped into logical data record streams.  A record
  20. stream is an ordered sequence of characters composed into records, each
  21. record consisting of zero or more characters plus a terminating record
  22. delimiter character.  The terminating record delimiter for a file is the
  23. newline character.
  24.  
  25. Each record consists of zero or more fields.  The record may be broken
  26. into fields in two different ways: (1) character delimited and (2) column
  27. delimited.  For character delimited fields, each field consists of zero or
  28. more characters plus a terminating field delimiter character or, for the
  29. last field in the record, the record delimiter character.  For column
  30. delimited fields, each field consists of one or more characters delimited
  31. by a single column position for fields consisting of one character, or by
  32. beginning and ending column positions for fields consisting of one or more
  33. characters.
  34.  
  35. Three types of fields are defined: (1) character, (2) text, and (3)
  36. numeric.  A character field consists of a single character.  A text
  37. field consists of a sequence of zero or more characters delimited at
  38. each end by an optional text delimiter character.  A numeric field
  39. consists of a sequence of one or more characters from the set of valid
  40. characters for the number type (integral or floating point) and radix.
  41.  
  42.  
  43. 1.1.2 Type
  44.  
  45. The type is
  46.  
  47.     REC
  48.  
  49. which is an object type capable of recording all information needed to
  50. control a record stream used for line oriented input or output, including
  51. its file pointer, pointers to its associated record and field buffers, field
  52. and text delimiting characters, an error indicator that records whether
  53. an error has occurred, and an end-of-file indicator that records whether
  54. the end of the file has been reached.
  55.  
  56.  
  57. 1.1.3 Macros
  58.  
  59. The macros are
  60.  
  61.     RECBUFSIZ
  62.     FLDBUFSIZ
  63.  
  64. which expand to integral constant expressions, which are the initial
  65. sizes of the record buffer and the field buffer;
  66.  
  67.     RECFLDCH
  68.     RECTXTCH
  69.  
  70. which expand to integral constant expressions, which are the default
  71. values of the characters used to separate the fields and delimit text
  72. in a record and whose default value shall correspond to the value of
  73. the space character;
  74.  
  75.     ROPEN_MAX
  76.  
  77. which expands to an integral constant expression that is the maximum
  78. number of files that can be open simultaneously;
  79.  
  80.     RECIN
  81.     RECOUT
  82.     RECERR
  83.  
  84. which expand to an integral constant expression that is the context
  85. number for the recin record stream that gets input from the <stdio.h>
  86. standard input stream stdin, the recout record stream that puts output
  87. to the <stdio.h> standard output stream stdout, and the recerr record
  88. stream that puts output to the <stdio.h> standard error stream stderr.
  89.  
  90.  
  91. 1.1.4 Expressions
  92.  
  93. The expressions are
  94.  
  95.     recin
  96.     recout
  97.     recerr
  98.  
  99. which are of type "pointer to REC" that points to the REC object associated
  100. with the <stdio.h> FILE objects stdin (standard input stream), stdout
  101. (standard output stream), and stderr (standard error stream).  The recin,
  102. recout, and recerr record streams are always open and are included in the
  103. count of ROPEN_MAX.
  104.  
  105.  
  106.  
  107. 1.2 Record Access Functions
  108.  
  109. 1.2.1 The rclose Function
  110.  
  111. Synopsis
  112.  
  113.      #include <recio.h>
  114.      int rclose(REC *rp);
  115.  
  116. Description
  117.  
  118. The rclose function causes the record stream pointed to by rp and the
  119. associated file to be closed.  Any unread data is discarded.  The record
  120. stream is disassociated from the file.  If associated buffers were
  121. automatically allocated, they are deallocated.
  122.  
  123. If an error occurs, the error indicator for the record stream is set,
  124. the callback error function is called (if registered), and the rclose
  125. function returns EOF.
  126.  
  127. Returns
  128.  
  129. The rclose function returns zero if the record stream is successfully
  130. closed, or EOF if any errors were detected.
  131.  
  132.  
  133. 1.2.2 The rcloseall Function
  134.  
  135. Synopsis
  136.  
  137.      #include <recio.h>
  138.      int rcloseall(void);
  139.  
  140. Description
  141.  
  142. The rcloseall function causes all the open record streams, and all the
  143. files associated with the open record streams, to be closed.  Any unread
  144. data is discarded.  Each record stream is disassociated from its file.
  145. If associated buffers were automatically allocated, they are deallocated.
  146.  
  147. If an error occurs, the rcloseall function returns EOF.
  148.  
  149. Returns
  150.  
  151. The rcloseall function returns the number of record streams successfully
  152. closed, or EOF if any errors were detected.
  153.  
  154.  
  155. 1.2.3 The ropen Function
  156.  
  157. Synopsis
  158.  
  159.      #include <recio.h>
  160.      REC *ropen(const char *filename, const char *mode);
  161.  
  162. Description
  163.  
  164. The ropen function opens the file whose name is the string pointed to by
  165. filename, and associates a record stream with it.  The argument mode
  166. points to a string whose first letter is:
  167.  
  168.        "r" - open text file for input
  169.        "w" - open text file for output
  170.        "a" - open text file for append
  171.  
  172. When successfully opened, the error and end-of-file indicators for the
  173. record stream are clear.  If an error occurs, errno is set to one of the
  174. error reporting macros as defined in <errno.h>, the callback error function
  175. is called (except when the file associated with filename is not able to be
  176. opened), and a null pointer is returned.
  177.  
  178. Returns
  179.  
  180. The ropen function returns a pointer to the object controlling the record
  181. stream.  If the open operation fails, ropen returns a null pointer.
  182.  
  183.  
  184. 1.2.4 The rsetfldsiz Function
  185.  
  186. Synopsis
  187.  
  188.      #include <recio.h>
  189.      int rsetfldsiz(REC *rp, size_t fldsize);
  190.  
  191. Description
  192.  
  193. The rsetfldsiz function reallocates the field buffer associated with the
  194. record stream pointed to by rp to the new size of fldsize.
  195.  
  196. The rsetfldsiz function may be used only after the record stream pointed
  197. to by rp has been opened and before any data is read into the record
  198. buffer.  Data is read into the record buffer by the function rgetrec,
  199. or by calling a function that either skips a field or gets data from a
  200. field.  If rsetfldsiz is not used, the initial size of the field buffer
  201. is set by the value of the macro FLDBUFSIZ.
  202.  
  203. If an error occurs, the error indicator for the record stream is set,
  204. the callback error function is called (if registered), and the rsetfldsiz
  205. function returns EOF.
  206.  
  207. Returns
  208.  
  209. The rsetfldsiz function returns zero if the field buffer is successfully
  210. reallocated, or EOF if any errors were detected.
  211.  
  212.  
  213. 1.2.5 The rsetrecsiz Function
  214.  
  215. Synopsis
  216.  
  217.      #include <recio.h>
  218.      int rsetrecsiz(REC *rp, size_t recsize);
  219.  
  220. Description
  221.  
  222. The rsetrecsiz function reallocates the record buffer associated with the
  223. record stream pointed to by rp to the new size of recsize.
  224.  
  225. The rsetrecsiz function may be used only after the record stream pointed
  226. to by rp has been opened and before any data is read into the record
  227. buffer.  Data is read into the record buffer by the function rgetrec,
  228. or by calling a function that either skips a field or gets data from a
  229. field.  If rsetrecsiz is not used, the initial size of the field buffer
  230. is set by the value of the macro RECBUFSIZ.
  231.  
  232. If an error occurs, the error indicator for the record stream is set,
  233. the callback error function is called (if registered), and the rsetrecsiz
  234. function returns EOF.
  235.  
  236. Returns
  237.  
  238. The rsetrecsiz function returns zero if the record buffer is successfully
  239. reallocated, or EOF if any errors were detected.
  240.  
  241.  
  242.  
  243. 1.3 Character Delimited Field Input Functions
  244.  
  245. The character delimited field input functions use a character (such as
  246. a comma or space) to determine where each field begins and ends.
  247.  
  248.  
  249. 1.3.1 The rbgeti Function
  250.  
  251. Synopsis
  252.  
  253.      #include <recio.h>
  254.      int rbgeti(REC *rp, int base);
  255.  
  256. Description
  257.  
  258. The rbgeti function reads a field consisting of one integral number
  259. represented by the radix determined by the value of base from the input
  260. record stream pointed to by rp.  Any leading or trailing white space
  261. in the field is ignored.
  262.  
  263. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  264. base is zero, the expected form of the integral number is described by
  265. section 3.1.3.2 of ANSI X3.159-1989.
  266.  
  267. If an error occurs, the error indicator for the record stream is set,
  268. the callback error function is called (if registered), and the rbgeti
  269. function returns zero.
  270.  
  271. Returns
  272.  
  273. The rbgeti function returns a signed integer from the input record
  274. stream pointed to by rp.  If an attempt is made to read beyond the
  275. end-of-record, if the field is empty, or if there is an illegal character
  276. in the field, the error indicator for the record stream is set, and rbgeti
  277. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  278. set), rbgeti returns zero.  If a previous error has occurred on the record
  279. stream that has not been cleared (error indicator set), rbgeti returns zero.
  280.  
  281.  
  282. 1.3.2 The rbgetl Function
  283.  
  284. Synopsis
  285.  
  286.      #include <recio.h>
  287.      long rbgetl(REC *rp, int base);
  288.  
  289. Description
  290.  
  291. The rbgetl function reads a field consisting of one integral number
  292. represented by the radix determined by the value of base from the input
  293. record stream pointed to by rp.  Any leading or trailing white space
  294. in the field is ignored.
  295.  
  296. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  297. base is zero, the expected form of the integral number is described by
  298. section 3.1.3.2 of ANSI X3.159-1989.
  299.  
  300. If an error occurs, the error indicator for the record stream is set,
  301. the callback error function is called (if registered), and the rbgetl
  302. function returns zero (0L).
  303.  
  304. Returns
  305.  
  306. The rbgetl function returns a signed long from the input record stream
  307. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  308. if the field is empty, or if there is an illegal character in the field,
  309. the error indicator for the record stream is set, and rbgetl returns zero
  310. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  311. rbgetl returns zero (0L).  If a previous error has occurred on the record
  312. stream that has not been cleared (error indicator set), rbgetl returns
  313. zero (0L).
  314.  
  315.  
  316. 1.3.3 The rbgetui Function
  317.  
  318. Synopsis
  319.  
  320.      #include <recio.h>
  321.      unsigned int rbgetui(REC *rp, int base);
  322.  
  323. Description
  324.  
  325. The rbgetui function reads a field consisting of one non-negative integral
  326. number represented by the radix determined by the value of base from the
  327. input record stream pointed to by rp.  Any leading or trailing white space
  328. in the field is ignored.
  329.  
  330. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  331. base is zero, the expected form of the integral number is described by
  332. section 3.1.3.2 of ANSI X3.159-1989.
  333.  
  334. If an error occurs, the error indicator for the record stream is set,
  335. the callback error function is called (if registered), and the rbgetui
  336. function returns zero.
  337.  
  338. Returns
  339.  
  340. The rbgetui function returns an unsigned integer from the input record
  341. stream pointed to by rp.  If an attempt is made to read beyond the
  342. end-of-record, if the field is empty, or if there is an illegal character
  343. in the field, the error indicator for the record stream is set, and rbgetui
  344. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  345. set), rbgetui returns zero.  If a previous error has occurred on the record
  346. stream that has not been cleared (error indicator set), rbgetui returns zero.
  347.  
  348.  
  349. 1.3.4 The rbgetul Function
  350.  
  351. Synopsis
  352.  
  353.      #include <recio.h>
  354.      unsigned long rbgetul(REC *rp, int base);
  355.  
  356. Description
  357.  
  358. The rbgetul function reads a field consisting of one non-negative integral
  359. number represented by the radix determined by the value of base from the
  360. input record stream pointed to by rp.  Any leading or trailing white space
  361. in the field is ignored.
  362.  
  363. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  364. base is zero, the expected form of the integral number is described by
  365. section 3.1.3.2 of ANSI X3.159-1989.
  366.  
  367. If an error occurs, the error indicator for the record stream is set,
  368. the callback error function is called (if registered), and the rbgetul
  369. function returns zero (0L).
  370.  
  371. Returns
  372.  
  373. The rbgetul function returns an unsigned long from the input record stream
  374. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  375. if the field is empty, or if there is an illegal character in the field,
  376. the error indicator for the record stream is set, and rbgetul returns zero
  377. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  378. rbgetul returns zero (0L).  If a previous error has occurred on the record
  379. stream that has not been cleared (error indicator set), rbgetul returns
  380. zero (0L).
  381.  
  382.  
  383. 1.3.5 The rgetc Function
  384.  
  385. Synopsis
  386.  
  387.      #include <recio.h>
  388.      int rgetc(REC *rp);
  389.  
  390. Description
  391.  
  392. The rgetc function reads a field consisting of one non-white space
  393. character from the input record stream pointed to by rp.  Any leading
  394. or trailing white space in the field is ignored.
  395.  
  396. If an error occurs, the error indicator for the record stream is set,
  397. the callback error function is called (if registered), and the rgetc
  398. function returns EOF.
  399.  
  400. Returns
  401.  
  402. The rgetc function returns a character from a single non-white
  403. space character field in the input record stream pointed to by rp.
  404. If an attempt is made to read beyond the end-of-record, or if there
  405. is more than or less than one non-white character in the field, the
  406. error indicator for the record stream is set, and rgetc returns EOF.  If the
  407. record stream is at end-of-file (end-of-file indicator set), rgetc returns
  408. EOF.  If a previous error has occurred on the record stream that has not been
  409. cleared (error indicator set), rgetc returns EOF.
  410.  
  411.  
  412. 1.3.6 The rgetd Function
  413.  
  414. Synopsis
  415.  
  416.      #include <recio.h>
  417.      double rgetd(REC *rp);
  418.  
  419. Description
  420.  
  421. The rgetd function reads a field consisting of one floating point
  422. number from the input record stream pointed to by rp.  Any leading
  423. or trailing white space in the field is ignored.
  424.  
  425. If an error occurs, the error indicator for the record stream is set,
  426. the callback error function is called (if registered), and the rgetd
  427. function returns zero (0.0).
  428.  
  429. Returns
  430.  
  431. The rgetd function returns a double precision floating point number
  432. from the input record stream pointed to by rp.  If an attempt is made
  433. to read beyond the end-of-record, if the field is empty, or if there
  434. is an illegal character in the field, the error indicator for the
  435. record stream is set, and rgetd returns zero (0.0).  If the record stream is
  436. at end-of-file (end-of-file indicator set), rgetd returns zero (0.0).  If a
  437. previous error has occurred on the record stream that has not been cleared
  438. (error indicator set), rgetd returns zero (0.0).
  439.  
  440.  
  441. 1.3.7 The rgetf Function
  442.  
  443. Synopsis
  444.  
  445.      #include <recio.h>
  446.      float rgetf(REC *rp);
  447.  
  448. Description
  449.  
  450. The rgetf function reads a field consisting of one floating point
  451. number from the input record stream pointed to by rp.  Any leading
  452. or trailing white space in the field is ignored.
  453.  
  454. If an error occurs, the error indicator for the record stream is set,
  455. the callback error function is called (if registered), and the rgetf
  456. function returns zero (0.0).
  457.  
  458. Returns
  459.  
  460. The rgetf function returns a single precision floating point number
  461. from the input record stream pointed to by rp.  If an attempt is made
  462. to read beyond the end-of-record, if the field is empty, or if there
  463. is an illegal character in the field, the error indicator for the
  464. record stream is set, and rgetf returns zero (0.0).  If the record stream is
  465. at end-of-file (end-of-file indicator set), rgetf returns zero (0.0).  If a
  466. previous error has occurred on the record stream that has not been cleared
  467. (error indicator set), rgetf returns zero (0.0).
  468.  
  469.  
  470. 1.3.8 The rgeti Function
  471.  
  472. Synopsis
  473.  
  474.      #include <recio.h>
  475.      int rgeti(REC *rp);
  476.  
  477. Description
  478.  
  479. The rgeti function reads a field consisting of one integral
  480. number from the input record stream pointed to by rp.  Any leading
  481. or trailing white space in the field is ignored.
  482.  
  483. If an error occurs, the error indicator for the record stream is set,
  484. the callback error function is called (if registered), and the rgeti
  485. function returns zero.
  486.  
  487. Returns
  488.  
  489. The rgeti function returns a signed integer from the input record
  490. stream pointed to by rp.  If an attempt is made to read beyond the
  491. end-of-record, if the field is empty, or if there is an illegal character
  492. in the field, the error indicator for the record stream is set, and rgeti
  493. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  494. set), rgeti returns zero.  If a previous error has occurred on the record
  495. stream that has not been cleared (error indicator set), rgeti returns zero.
  496.  
  497.  
  498. 1.3.9 The rgetl Function
  499.  
  500. Synopsis
  501.  
  502.      #include <recio.h>
  503.      long rgetl(REC *rp);
  504.  
  505. Description
  506.  
  507. The rgetl function reads a field consisting of one integral number
  508. from the input record stream pointed to by rp.  Any leading or trailing
  509. white space in the field is ignored.
  510.  
  511. If an error occurs, the error indicator for the record stream is set,
  512. the callback error function is called (if registered), and the rgetl
  513. function returns zero (0L).
  514.  
  515. Returns
  516.  
  517. The rgetl function returns a signed long from the input record stream
  518. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  519. if the field is empty, or if there is an illegal character in the field,
  520. the error indicator for the record stream is set, and rgetl returns zero
  521. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  522. rgetl returns zero (0L).  If a previous error has occurred on the record
  523. stream that has not been cleared (error indicator set), rgetl returns zero
  524. (0L).
  525.  
  526.  
  527. 1.3.10 The rgets Function
  528.  
  529. Synopsis
  530.  
  531.      #include <recio.h>
  532.      char *rgets(REC *rp);
  533.  
  534. Description
  535.  
  536. The rgets function reads a field consisting of one text string from the
  537. input record stream pointed to by rp.  Any leading white space before the
  538. text delimiter and any trailing white space after the text delimiter in
  539. the field is ignored.  The text delimiters are not returned as part of
  540. the string.
  541.  
  542. If an error occurs, the error indicator for the record stream is set,
  543. the callback error function is called (if registered), and the rgets
  544. function returns a pointer to an empty string.
  545.  
  546. Returns
  547.  
  548. The rgets function returns a pointer to a character array from the input
  549. record stream pointed to by rp.  If an attempt is made to read beyond the
  550. end-of-record, the error indicator for the record stream is set, and rgets
  551. returns a pointer to an empty string.  If the record stream is at end-of-file
  552. (end-of-file indicator set), rgets returns a pointer to an empty string.  If
  553. a previous error has occurred on the record stream that has not been cleared
  554. (error indicator set), rgets returns a pointer to an empty string.
  555.  
  556.  
  557. 1.3.11 The rgetui Function
  558.  
  559. Synopsis
  560.  
  561.      #include <recio.h>
  562.      unsigned int rgetui(REC *rp);
  563.  
  564. Description
  565.  
  566. The rgetui function reads a field consisting of one non-negative
  567. integral number from the input record stream pointed to by rp.  Any
  568. leading or trailing white space in the field is ignored.
  569.  
  570. If an error occurs, the error indicator for the record stream is set,
  571. the callback error function is called (if registered), and the rgetui
  572. function returns zero.
  573.  
  574. Returns
  575.  
  576. The rgetui function returns an unsigned integer from the input record
  577. stream pointed to by rp.  If an attempt is made to read beyond the
  578. end-of-record, if the field is empty, or if there is an illegal character
  579. in the field, the error indicator for the record stream is set, and rgetui
  580. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  581. set), rgetui returns zero.  If a previous error has occurred on the record
  582. stream that has not been cleared (error indicator set), rgetui returns zero.
  583.  
  584.  
  585. 1.3.12 The rgetul Function
  586.  
  587. Synopsis
  588.  
  589.      #include <recio.h>
  590.      unsigned long rgetul(REC *rp);
  591.  
  592. Description
  593.  
  594. The rgetul function reads a field consisting of one non-negative
  595. integral number from the input record stream pointed to by rp.  Any
  596. leading or trailing white space in the field is ignored.
  597.  
  598. If an error occurs, the error indicator for the record stream is set,
  599. the callback error function is called (if registered), and the rgetul
  600. function returns zero (0L).
  601.  
  602. Returns
  603.  
  604. The rgetul function returns an unsigned long from the input record stream
  605. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  606. if the field is empty, or if there is an illegal character in the field,
  607. the error indicator for the record stream is set, and rgetul returns zero
  608. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  609. rgetul returns zero (0L).  If a previous error has occurred on the record
  610. stream that has not been cleared (error indicator set), rgetul returns zero
  611. (0L).
  612.  
  613.  
  614. 1.3.13 The rsetfldch Function
  615.  
  616. Synopsis
  617.  
  618.      #include <recio.h>
  619.      int rsetfldch(REC *rp, int ch);
  620.  
  621. Description
  622.  
  623. The rsetfldch function sets the field delimiter to the character ch
  624. for the record stream pointed to by rp.  If the character ch is the
  625. space character ' ', then the field is delimited by any white-space,
  626. and multiple contiguous white space characters are treated as a single
  627. delimiter.  If the character ch is other than the space character, then
  628. multiple contiguous field delimiters are treated as a series of empty
  629. fields.
  630.  
  631. If rsetfldch is not called, the field delimiter is set by the value of
  632. the macro RECFLDCH.
  633.  
  634. If an error occurs, the error indicator for the record stream is set,
  635. the callback error function is called (if registered), and the rsetfldch
  636. function returns EOF.
  637.  
  638. Returns
  639.  
  640. The rsetfldch function returns zero if the field delimiter character was
  641. successfully set for the record stream, or EOF if any errors were detected.
  642.  
  643.  
  644. 1.3.14 The rsettxtch Function
  645.  
  646. Synopsis
  647.  
  648.      #include <recio.h>
  649.      int rsettxtch(REC *rp, int ch);
  650.  
  651. Description
  652.  
  653. The rsettxtch function sets the text delimiter to the character ch for
  654. the record stream pointed to by rp.
  655.  
  656. If rsettxtch is not called, the text delimiter is set by the value of
  657. the macro RECTXTCH.
  658.  
  659. If an error occurs, the error indicator for the record stream is set,
  660. the callback error function is called (if registered), and the rsettxtch
  661. function returns EOF.
  662.  
  663. Returns
  664.  
  665. The rsettxtch function returns zero if the text delimiter character was
  666. successfully set for the record stream, or EOF if any errors were detected.
  667.  
  668.  
  669. 1.3.15 The rskipfld Function
  670.  
  671. Synopsis
  672.  
  673.      #include <recio.h>
  674.      int rskipfld(REC *rp);
  675.  
  676. Description
  677.  
  678. The rskipfld function skips to the next field for the record stream
  679. pointed to by rp.
  680.  
  681. If an error occurs, the error indicator for the record stream is set,
  682. the callback error function is called (if registered), and the rskipfld
  683. function returns EOF.
  684.  
  685. Returns
  686.  
  687. The rskipfld function returns one if the field was successfully skipped,
  688. zero if the field could not be skipped (end of record), or EOF if any
  689. errors were detected.
  690.  
  691.  
  692. 1.3.16 The rskipnfld Function
  693.  
  694. Synopsis
  695.  
  696.      #include <recio.h>
  697.      int rskipnfld(REC *rp, size_t num);
  698.  
  699. Description
  700.  
  701. The rskipnfld function skips over num number of fields for the record
  702. stream pointed to by rp.
  703.  
  704. If an error occurs, the error indicator for the record stream is set,
  705. the callback error function is called (if registered), and the rskipnfld
  706. function returns EOF.
  707.  
  708. Returns
  709.  
  710. The rskipfld function returns the actual number of fields skipped, or EOF
  711. if any errors were detected.
  712.  
  713.  
  714.  
  715. 1.4 Character Delimited Field Output Functions
  716.  
  717. The character delimited field output functions automatically place the
  718. field delimiter character between fields in the output.
  719.  
  720.  
  721. 1.4.1 The rbputi Function
  722.  
  723. Synopsis
  724.  
  725.      #include <recio.h>
  726.      int rbputi(REC *rp, int base, int number);
  727.  
  728. Description
  729.  
  730. The rbputi function writes an integral number in the radix base to the
  731. output record stream pointed to by rp.  Base may be between 2 to 36.
  732.  
  733. If an error occurs, the error indicator for the record stream is set,
  734. the callback error function is called, and EOF is returned.
  735.  
  736. Returns
  737.  
  738. The rbputi function returns zero on success and EOF on error.
  739.  
  740.  
  741. 1.4.2 The rbputl Function
  742.  
  743. Synopsis
  744.  
  745.      #include <recio.h>
  746.      int rbputl(REC *rp, int base, long number);
  747.  
  748. Description
  749.  
  750. The rbputl function writes an integral number in the radix base to the
  751. output record stream pointed to by rp.  Base may be between 2 to 36.
  752.  
  753. If an error occurs, the error indicator for the record stream is set,
  754. the callback error function is called, and EOF is returned.
  755.  
  756. Returns
  757.  
  758. The rbputl function returns zero on success and EOF on error.
  759.  
  760.  
  761. 1.4.3 The rbputui Function
  762.  
  763. Synopsis
  764.  
  765.      #include <recio.h>
  766.      int rbputui(REC *rp, int base, unsigned int number);
  767.  
  768. Description
  769.  
  770. The rbputui function writes an unsigned integral number in the radix base to
  771. the output record stream pointed to by rp.  Base may be between 2 to 36.
  772.  
  773. If an error occurs, the error indicator for the record stream is set,
  774. the callback error function is called, and EOF is returned.
  775.  
  776. Returns
  777.  
  778. The rbputui function returns zero on success and EOF on error.
  779.  
  780.  
  781. 1.4.4 The rbputul Function
  782.  
  783. Synopsis
  784.  
  785.      #include <recio.h>
  786.      int rbputul(REC *rp, int base, unsigned long number);
  787.  
  788. Description
  789.  
  790. The rbputul function writes an unsigned integral number in the radix base to
  791. the output record stream pointed to by rp.  Base may be between 2 to 36.
  792.  
  793. If an error occurs, the error indicator for the record stream is set,
  794. the callback error function is called, and EOF is returned.
  795.  
  796. Returns
  797.  
  798. The rbputul function returns zero on success and EOF on error.
  799.  
  800.  
  801. 1.4.5 The rputc Function
  802.  
  803. Synopsis
  804.  
  805.      #include <recio.h>
  806.      int rputc(REC *rp, int ch);
  807.  
  808. Description
  809.  
  810. The rputc function writes a character ch to the output record stream
  811. pointed to by rp.
  812.  
  813. If an error occurs, the error indicator for the record stream is set,
  814. the callback error function is called, and EOF is returned.
  815.  
  816. Returns
  817.  
  818. The rputc function returns zero on success and EOF on error.
  819.  
  820.  
  821. 1.4.6 The rputd Function
  822.  
  823. Synopsis
  824.  
  825.      #include <recio.h>
  826.      int rputd(REC *rp, double number);
  827.  
  828. Description
  829.  
  830. The rputd function writes a floating point number to the output record
  831. stream pointed to by rp.
  832.  
  833. If an error occurs, the error indicator for the record stream is set,
  834. the callback error function is called, and EOF is returned.
  835.  
  836. Returns
  837.  
  838. The rputd function returns zero on success and EOF on error.
  839.  
  840.  
  841. 1.4.7 The rputf Function
  842.  
  843. Synopsis
  844.  
  845.      #include <recio.h>
  846.      int rputf(REC *rp, float number);
  847.  
  848. Description
  849.  
  850. The rputf function writes a floating point number to the output record
  851. stream pointed to by rp.
  852.  
  853. If an error occurs, the error indicator for the record stream is set,
  854. the callback error function is called, and EOF is returned.
  855.  
  856. Returns
  857.  
  858. The rputf function returns zero on success and EOF on error.
  859.  
  860.  
  861. 1.4.8 The rputi Function
  862.  
  863. Synopsis
  864.  
  865.      #include <recio.h>
  866.      int rputi(REC *rp, int number);
  867.  
  868. Description
  869.  
  870. The rputi function writes an integral number to the output record stream
  871. pointed to by rp.
  872.  
  873. If an error occurs, the error indicator for the record stream is set,
  874. the callback error function is called, and EOF is returned.
  875.  
  876. Returns
  877.  
  878. The rputi function returns zero on success and EOF on error.
  879.  
  880.  
  881. 1.4.9 The rputl Function
  882.  
  883. Synopsis
  884.  
  885.      #include <recio.h>
  886.      int rputl(REC *rp, long number);
  887.  
  888. Description
  889.  
  890. The rputl function writes an integral number to the output record stream
  891. pointed to by rp.
  892.  
  893. If an error occurs, the error indicator for the record stream is set,
  894. the callback error function is called, and EOF is returned.
  895.  
  896. Returns
  897.  
  898. The rputl function returns zero on success and EOF on error.
  899.  
  900.  
  901. 1.4.10 The rputs Function
  902.  
  903. Synopsis
  904.  
  905.      #include <recio.h>
  906.      int rputs(REC *rp, char *string);
  907.  
  908. Description
  909.  
  910. The rputs function writes a string of characters to the output record
  911. stream pointed to by rp.  If the text delimiter character is not the space
  912. character, text delimiters are placed around the text.
  913.  
  914. If an error occurs, the error indicator for the record stream is set,
  915. the callback error function is called, and EOF is returned.
  916.  
  917. Returns
  918.  
  919. The rputs function returns zero on success and EOF on error.
  920.  
  921.  
  922. 1.4.11 The rputui Function
  923.  
  924. Synopsis
  925.  
  926.      #include <recio.h>
  927.      int rputui(REC *rp, unsigned int number);
  928.  
  929. Description
  930.  
  931. The rputui function writes an unsigned integral number to the output record
  932. stream pointed to by rp.
  933.  
  934. If an error occurs, the error indicator for the record stream is set, the
  935. callback error function is called, and EOF is returned.
  936.  
  937. Returns
  938.  
  939. The rputui function returns zero on success and EOF on error.
  940.  
  941.  
  942. 1.4.12 The rputul Function
  943.  
  944. Synopsis
  945.  
  946.      #include <recio.h>
  947.      int rputul(REC *rp, unsigned long number);
  948.  
  949. Description
  950.  
  951. The rputul function writes an unsigned integral number to the output record
  952. stream pointed to by rp.
  953.  
  954. If an error occurs, the error indicator for the record stream is set, the
  955. callback error function is called, and EOF is returned.
  956.  
  957. Returns
  958.  
  959. The rputul function returns zero on success and EOF on error.
  960.  
  961.  
  962.  
  963. 1.5 Column Delimited Field Input Functions
  964.  
  965. The column delimited field input functions use column positions to
  966. determine the start and end of each field.
  967.  
  968.  
  969. 1.5.1 The rcbgeti Function
  970.  
  971. Synopsis
  972.  
  973.      #include <recio.h>
  974.      int rcbgeti(REC *rp, size_t begcol, size_t endcol, int base);
  975.  
  976. Description
  977.  
  978. The rcbgeti function gets one integral number represented by the radix
  979. determined by the value of base and contained inclusively from column
  980. begcol to column endcol for the input record stream pointed to by rp.
  981. Any leading or trailing white space in the field is ignored.
  982.  
  983. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  984. base is zero, the expected form of the integral number is described by
  985. section 3.1.3.2 of ANSI X3.159-1989.
  986.  
  987. If an error occurs, the error indicator for the record stream is set,
  988. the callback error function is called (if registered), and the rgeti
  989. function returns zero.
  990.  
  991. Returns
  992.  
  993. The rcbgeti function returns a signed integer from the input record stream
  994. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  995. empty, or if there is an illegal character in the field, the error indicator
  996. for the record stream is set, and rcbgeti returns zero.  If the record stream
  997. is at end-of-file (end-of-file indicator set), rcbgeti returns zero.  If a
  998. previous error has occurred on the record stream that has not been cleared
  999. (error indicator set), rcbgeti returns zero.
  1000.  
  1001.  
  1002. 1.5.2 The rcbgetl Function
  1003.  
  1004. Synopsis
  1005.  
  1006.      #include <recio.h>
  1007.      long rcbgetl(REC *rp, size_t begcol, size_t endcol, int base);
  1008.  
  1009. Description
  1010.  
  1011. The rcbgetl function gets one integral number represented by the radix
  1012. determined by the value of base and contained inclusively from column
  1013. begcol to column endcol for the input record stream pointed to by rp.
  1014. Any leading or trailing white space in the field is ignored.
  1015.  
  1016. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1017. base is zero, the expected form of the integral number is described by
  1018. section 3.1.3.2 of ANSI X3.159-1989.
  1019.  
  1020. If an error occurs, the error indicator for the record stream is set,
  1021. the callback error function is called (if registered), and the rgetl
  1022. function returns zero (0L).
  1023.  
  1024. Returns
  1025.  
  1026. The rcbgetl function returns a signed long from the input record stream
  1027. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1028. empty, or if there is an illegal character in the field, the error indicator
  1029. for the record stream is set, and rcbgetl returns zero (0L).  If the record
  1030. stream is at end-of-file (end-of-file indicator set), rcbgetl returns zero
  1031. (0L).  If a previous error has occurred on the record stream that has not been
  1032. cleared (error indicator set), rcbgetl returns zero (0L).
  1033.  
  1034.  
  1035. 1.5.3 The rcbgetui Function
  1036.  
  1037. Synopsis
  1038.  
  1039.      #include <recio.h>
  1040.      unsigned int rcbgetui(REC *rp, size_t begcol, size_t endcol,
  1041.           int base);
  1042.  
  1043. Description
  1044.  
  1045. The rcbgetui function gets one non-negative integral number represented
  1046. by the radix determined by the value of base and contained inclusively
  1047. from column begcol to column endcol for the input record stream pointed
  1048. to by rp.  Any leading or trailing white space in the field is ignored.
  1049.  
  1050. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1051. base is zero, the expected form of the integral number is described by
  1052. section 3.1.3.2 of ANSI X3.159-1989.
  1053.  
  1054. If an error occurs, the error indicator for the record stream is set,
  1055. the callback error function is called (if registered), and the rgetui
  1056. function returns zero.
  1057.  
  1058. Returns
  1059.  
  1060. The rcbgetui function returns an unsigned integer from the input record
  1061. stream pointed to by rp.  If begcol is beyond the end-of-record, if the
  1062. field is empty, or if there is an illegal character in the field, the
  1063. error indicator for the record stream is set, and rcbgetui returns zero.  If
  1064. the record stream is at end-of-file (end-of-file indicator set), rcbgetui
  1065. returns zero.  If a previous error has occurred on the record stream that has
  1066. not been cleared (error indicator set), rcbgetui returns zero.
  1067.  
  1068.  
  1069. 1.5.4 The rcbgetul Function
  1070.  
  1071. Synopsis
  1072.  
  1073.      #include <recio.h>
  1074.      unsigned long rcbgetul(REC *rp, size_t begcol, size_t endcol,
  1075.           int base);
  1076.  
  1077. Description
  1078.  
  1079. The rcbgetul function gets one non-negative integral number represented
  1080. by the radix determined by the value of base and contained inclusively
  1081. from column begcol to column endcol for the input record stream pointed
  1082. to by rp.  Any leading or trailing white space in the field is ignored.
  1083.  
  1084. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1085. base is zero, the expected form of the integral number is described by
  1086. section 3.1.3.2 of ANSI X3.159-1989.
  1087.  
  1088. If an error occurs, the error indicator for the record stream is set,
  1089. the callback error function is called (if registered), and the rgetul
  1090. function returns zero (0L).
  1091.  
  1092. Returns
  1093.  
  1094. The rcbgetul function returns an unsigned long from the input record stream
  1095. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1096. empty, or if there is an illegal character in the field, the error indicator
  1097. for the record stream is set, and rcbgetul returns zero (0L).  If the record
  1098. stream is at end-of-file (end-of-file indicator set), rcbgetul returns zero
  1099. (0L).  If a previous error has occurred on the record stream that has not been
  1100. cleared (error indicator set), rcbgetul returns zero (0L).
  1101.  
  1102.  
  1103. 1.5.5 The rcgetc Function
  1104.  
  1105. Synopsis
  1106.  
  1107.      #include <recio.h>
  1108.      int rcgetc(REC *rp, size_t col);
  1109.  
  1110. Description
  1111.  
  1112. The rcgetc function obtains from column position col the unsigned char
  1113. converted to an int from the input record stream pointed to by rp.
  1114.  
  1115. If an error occurs, the error indicator for the record stream is set,
  1116. the callback error function is called (if registered), and the rcgetc
  1117. function returns EOF.
  1118.  
  1119. Returns
  1120.  
  1121. The rcgetc function returns a character from column position col from
  1122. the input record stream pointed to by rp.  If an attempt is made to read
  1123. beyond the end-of-record, the error indicator for the record stream is set,
  1124. and rcgetc returns EOF.  If the record stream is at end-of-file (end-of-file
  1125. indicator set), rcgetc returns EOF.  If a previous error has occurred on the
  1126. record stream that has not been cleared (error indicator set), rcgetc returns
  1127. EOF.
  1128.  
  1129.  
  1130. 1.5.6 The rcgetd Function
  1131.  
  1132. Synopsis
  1133.  
  1134.      #include <recio.h>
  1135.      double rcgetd(REC *rp, size_t begcol, size_t endcol);
  1136.  
  1137. Description
  1138.  
  1139. The rcgetd function gets one floating point number contained inclusively
  1140. from column begcol to column endcol for the input record stream pointed to
  1141. by rp.  Any leading or trailing white space in the field is ignored.
  1142.  
  1143. If an error occurs, the error indicator for the record stream is set,
  1144. the callback error function is called (if registered), and the rcgetd
  1145. function returns zero (0.0).
  1146.  
  1147. Returns
  1148.  
  1149. The rcgetd function returns a double precision floating point number from the
  1150. input record stream pointed to by rp.  If begcol is beyond the end-of-record,
  1151. if the field is empty, or if there is an illegal character in the field, the
  1152. error indicator for the record stream is set, and rcgetd returns zero (0.0).
  1153. If the record stream is at end-of-file (end-of-file indicator set), rcgetd
  1154. returns zero (0.0).  If a previous error has occurred on the record stream
  1155. that has not been cleared (error indicator set), rcgetd returns zero (0.0).
  1156.  
  1157.  
  1158. 1.5.7 The rcgetf Function
  1159.  
  1160. Synopsis
  1161.  
  1162.      #include <recio.h>
  1163.      float rcgetf(REC *rp, size_t begcol, size_t endcol);
  1164.  
  1165. Description
  1166.  
  1167. The rcgetd function gets one floating point number contained inclusively
  1168. from column begcol to column endcol for the input record stream pointed to
  1169. by rp.  Any leading or trailing white space in the field is ignored.
  1170.  
  1171. If an error occurs, the error indicator for the record stream is set,
  1172. the callback error function is called (if registered), and the rcgetf
  1173. function returns zero (0.0).
  1174.  
  1175. Returns
  1176.  
  1177. The rcgetf function returns a single precision floating point number from the
  1178. input record stream pointed to by rp.  If begcol is beyond the end-of-record,
  1179. if the field is empty, or if there is an illegal character in the field, the
  1180. error indicator for the record stream is set, and rcgetf returns zero (0.0).
  1181. If the record stream is at end-of-file (end-of-file indicator set), rcgetf
  1182. returns zero (0.0).  If a previous error has occurred on the record stream
  1183. that has not been cleared (error indicator set), rcgetf returns zero (0.0).
  1184.  
  1185.  
  1186. 1.5.8 The rcgeti Function
  1187.  
  1188. Synopsis
  1189.  
  1190.      #include <recio.h>
  1191.      int rcgeti(REC *rp, size_t begcol, size_t endcol);
  1192.  
  1193. Description
  1194.  
  1195. The rcgeti function gets one integral number contained inclusively from
  1196. column begcol to column endcol for the input record stream pointed to by
  1197. rp.  Any leading or trailing white space in the field is ignored.
  1198.  
  1199. If an error occurs, the error indicator for the record stream is set,
  1200. the callback error function is called (if registered), and the rgeti
  1201. function returns zero.
  1202.  
  1203. Returns
  1204.  
  1205. The rcgeti function returns a signed integer from the input record stream
  1206. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1207. empty, or if there is an illegal character in the field, the error indicator
  1208. for the record stream is set, and rcgeti returns zero.  If the record stream
  1209. is at end-of-file (end-of-file indicator set), rcgeti returns zero.  If a
  1210. previous error has occurred on the record stream that has not been cleared
  1211. (error indicator set), rcgeti returns zero.
  1212.  
  1213.  
  1214. 1.5.9 The rcgetl Function
  1215.  
  1216. Synopsis
  1217.  
  1218.      #include <recio.h>
  1219.      long rcgetl(REC *rp, size_t begcol, size_t endcol);
  1220.  
  1221. Description
  1222.  
  1223. The rcgetl function gets one integral number contained inclusively from
  1224. column begcol to column endcol for the input record stream pointed to by
  1225. rp.  Any leading or trailing white space in the field is ignored.
  1226.  
  1227. If an error occurs, the error indicator for the record stream is set,
  1228. the callback error function is called (if registered), and the rgetl
  1229. function returns zero (0L).
  1230.  
  1231. Returns
  1232.  
  1233. The rcgetl function returns a signed long from the input record stream
  1234. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1235. empty, or if there is an illegal character in the field, the error indicator
  1236. for the record stream is set, and rcgetl returns zero (0L).  If the record
  1237. stream is at end-of-file (end-of-file indicator set), rcgetl returns zero
  1238. (0L).  If a previous error has occurred on the record stream that has not
  1239. been cleared (error indicator set), rcgetl returns zero (0L).
  1240.  
  1241.  
  1242. 1.5.10 The rcgets Function
  1243.  
  1244. Synopsis
  1245.  
  1246.      #include <recio.h>
  1247.      char *rcgets(REC *rp, size_t begcol, size_t endcol);
  1248.  
  1249. Description
  1250.  
  1251. The rcgets function gets a string contained inclusively from column
  1252. begcol to column endcol for the input record stream pointed to by
  1253. rp.  The rcgets function does not remove any leading or trailing
  1254. white space, nor does it remove any text delimiter characters.
  1255.  
  1256. If an error occurs, the error indicator for the record stream is set,
  1257. the callback error function is called (if registered), and the rgets
  1258. function returns a pointer to an empty string.
  1259.  
  1260. Returns
  1261.  
  1262. The rcgets function returns a pointer to a character array from the input
  1263. record stream pointed to by rp.  If begcol is beyond the end-of-record, the
  1264. error indicator for the record stream is set, and rcgets returns a pointer to
  1265. an empty string.  If the record stream is at end-of-file (eof indicator set),
  1266. rcgets returns a pointer to an empty string.  If a previous error has occurred
  1267. on the record stream that has not been cleared (error indicator set), rcgets
  1268. returns a pointer to an empty string.
  1269.  
  1270.  
  1271. 1.5.11 The rcgetui Function
  1272.  
  1273. Synopsis
  1274.  
  1275.      #include <recio.h>
  1276.      unsigned int rcgetui(REC *rp, size_t begcol, size_t endcol);
  1277.  
  1278. Description
  1279.  
  1280. The rcgetui function gets one non-negative integral number contained
  1281. inclusively from column begcol to column endcol for the input record
  1282. stream pointed to by rp.  Any leading or trailing white space in the
  1283. field is ignored.
  1284.  
  1285. If an error occurs, the error indicator for the record stream is set,
  1286. the callback error function is called (if registered), and the rgetui
  1287. function returns zero.
  1288.  
  1289. Returns
  1290.  
  1291. The rcgetui function returns an unsigned integer from the input record
  1292. stream pointed to by rp.  If begcol is beyond the end-of-record, if the
  1293. field is empty, or if there is an illegal character in the field, the
  1294. error indicator for the record stream is set, and rcgetui returns zero.  If
  1295. the record stream is at end-of-file (end-of-file indicator set), rcgetui
  1296. returns zero.  If a previous error has occurred on the record stream that has
  1297. not been cleared (error indicator set), rcgetui returns zero.
  1298.  
  1299.  
  1300. 1.5.12 The rcgetul Function
  1301.  
  1302. Synopsis
  1303.  
  1304.      #include <recio.h>
  1305.      unsigned long rcgetul(REC *rp, size_t begcol, size_t endcol);
  1306.  
  1307. Description
  1308.  
  1309. The rcgetul function gets one non-negative integral number contained
  1310. inclusively from column begcol to column endcol for the input record
  1311. stream pointed to by rp.  Any leading or trailing white space in the
  1312. field is ignored.
  1313.  
  1314. If an error occurs, the error indicator for the record stream is set,
  1315. the callback error function is called (if registered), and the rgetul
  1316. function returns zero (0L).
  1317.  
  1318. Returns
  1319.  
  1320. The rcgetul function returns an unsigned long from the input record stream
  1321. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1322. empty, or if there is an illegal character in the field, the error indicator
  1323. for the record stream is set, and rcgetul returns zero (0L).  If the record
  1324. stream is at end-of-file (end-of-file indicator set), rcgetul returns zero
  1325. (0L).  If a previous error has occurred on the record stream that has not
  1326. been cleared (error indicator set), rcgetul returns zero (0L).
  1327.  
  1328.  
  1329.  
  1330. 1.6 Column Delimited Field Output Functions
  1331.  
  1332. The column delimited field output functions automatically place the number,
  1333. string or character between the specified columns in the output.
  1334.  
  1335.  
  1336. 1.6.1 The rcbputi Function
  1337.  
  1338. Synopsis
  1339.  
  1340.      #include <recio.h>
  1341.      int rcbputi(REC *rp, size_t begcol, size_t endcol, int base,
  1342.                  int number);
  1343.  
  1344. Description
  1345.  
  1346. The rcbputi function writes an integral number in the radix base from column
  1347. begcol to column endcol of the output record stream pointed to by rp.  Base
  1348. may be between 2 to 36.
  1349.  
  1350. If the number is too large to fit between the columns, asterisks are printed
  1351. between the columns, the callback error function is called, and zero is
  1352. returned.  The error indicator for the record stream is not set.
  1353.  
  1354. If an error occurs, the error indicator for the record stream is set, the
  1355. callback error function is called, and EOF is returned.
  1356.  
  1357. Returns
  1358.  
  1359. The rcbputi function returns zero on success and EOF on error.
  1360.  
  1361.  
  1362. 1.6.2 The rcbputl Function
  1363.  
  1364. Synopsis
  1365.  
  1366.      #include <recio.h>
  1367.      int rcbputl(REC *rp, size_t begcol, size_t endcol, int base,
  1368.                  long number);
  1369.  
  1370. Description
  1371.  
  1372. The rcbputl function writes an integral number in the radix base from column
  1373. begcol to column endcol of the output record stream pointed to by rp.  Base
  1374. may be between 2 to 36.
  1375.  
  1376. If the number is too large to fit between the columns, asterisks are printed
  1377. between the columns, the callback error function is called, and zero is
  1378. returned.  The error indicator for the record stream is not set.
  1379.  
  1380. If an error occurs, the error indicator for the record stream is set,
  1381. the callback error function is called, and EOF is returned.
  1382.  
  1383. Returns
  1384.  
  1385. The rcbputl function returns zero on success and EOF on error.
  1386.  
  1387.  
  1388. 1.6.3 The rcbputui Function
  1389.  
  1390. Synopsis
  1391.  
  1392.      #include <recio.h>
  1393.      int rcbputui(REC *rp, size_t begcol, size_t endcol, int base,
  1394.                   unsigned int number);
  1395.  
  1396. Description
  1397.  
  1398. The rcbputui function writes an unsigned integral number in the radix base
  1399. from column begcol to column endcol of the output record stream pointed to
  1400. by rp.  Base may be between 2 to 36.
  1401.  
  1402. If the number is too large to fit between the columns, asterisks are printed
  1403. between the columns, the callback error function is called, and zero is
  1404. returned.  The error indicator for the record stream is not set.
  1405.  
  1406. If an error occurs, the error indicator for the record stream is set,
  1407. the callback error function is called, and EOF is returned.
  1408.  
  1409. Returns
  1410.  
  1411. The rcbputui function returns zero on success and EOF on error.
  1412.  
  1413.  
  1414. 1.6.4 The rcbputul Function
  1415.  
  1416. Synopsis
  1417.  
  1418.      #include <recio.h>
  1419.      int rcbputul(REC *rp, size_t begcol, size_t endcol, int base,
  1420.                   unsigned long number);
  1421.  
  1422. Description
  1423.  
  1424. The rcbputul function writes an unsigned integral number in the radix base
  1425. from column begcol to column endcol of the output record stream pointed to
  1426. by rp.  Base may be between 2 to 36.
  1427.  
  1428. If the number is too large to fit between the columns, asterisks are printed
  1429. between the columns, the callback error function is called, and zero is
  1430. returned.  The error indicator for the record stream is not set.
  1431.  
  1432. If an error occurs, the error indicator for the record stream is set,
  1433. the callback error function is called, and EOF is returned.
  1434.  
  1435. Returns
  1436.  
  1437. The rcbputul function returns zero on success and EOF on error.
  1438.  
  1439.  
  1440. 1.6.5 The rcputc Function
  1441.  
  1442. Synopsis
  1443.  
  1444.      #include <recio.h>
  1445.      int rcputc(REC *rp, size_t col, int ch);
  1446.  
  1447. Description
  1448.  
  1449. The rcputc function writes a character ch at column col of the output record
  1450. stream pointed to by rp.
  1451.  
  1452. If an error occurs, the error indicator for the record stream is set, the
  1453. callback error function is called, and EOF is returned.
  1454.  
  1455. Returns
  1456.  
  1457. The rcputc function returns zero on success and EOF on error.
  1458.  
  1459.  
  1460. 1.6.6 The rcputd Function
  1461.  
  1462. Synopsis
  1463.  
  1464.      #include <recio.h>
  1465.      int rcputd(REC *rp, size_t begcol, size_t endcol, double number);
  1466.  
  1467. Description
  1468.  
  1469. The rcputd function writes a floating point number from column begcol to
  1470. column endcol of the output record stream pointed to by rp.
  1471.  
  1472. If the number is too large to fit between the columns, asterisks are printed
  1473. between the columns, the callback error function is called, and zero is
  1474. returned.  The error indicator for the record stream is not set.
  1475.  
  1476. If an error occurs, the error indicator for the record stream is set,
  1477. the callback error function is called, and EOF is returned.
  1478.  
  1479. Returns
  1480.  
  1481. The rcputd function returns zero on success and EOF on error.
  1482.  
  1483.  
  1484. 1.6.7 The rcputf Function
  1485.  
  1486. Synopsis
  1487.  
  1488.      #include <recio.h>
  1489.      int rcputf(REC *rp, size_t begcol, size_t endcol, float number);
  1490.  
  1491. Description
  1492.  
  1493. The rcputf function writes a floating point number from column begcol to
  1494. column endcol of the output record stream pointed to by rp.
  1495.  
  1496. If the number is too large to fit between the columns, asterisks are printed
  1497. between the columns, the callback error function is called, and zero is
  1498. returned.  The error indicator for the record stream is not set.
  1499.  
  1500. If an error occurs, the error indicator for the record stream is set,
  1501. the callback error function is called, and EOF is returned.
  1502.  
  1503. Returns
  1504.  
  1505. The rcputf function returns zero on success and EOF on error.
  1506.  
  1507.  
  1508. 1.6.8 The rcputi Function
  1509.  
  1510. Synopsis
  1511.  
  1512.      #include <recio.h>
  1513.      int rcputi(REC *rp, size_t begcol, size_t endcol, int number);
  1514.  
  1515. Description
  1516.  
  1517. The rcputi function writes an integral number from column begcol to column
  1518. endcol of the output record stream pointed to by rp.
  1519.  
  1520. If the number is too large to fit between the columns, asterisks are printed
  1521. between the columns, the callback error function is called, and zero is
  1522. returned.  The error indicator for the record stream is not set.
  1523.  
  1524. If an error occurs, the error indicator for the record stream is set,
  1525. the callback error function is called, and EOF is returned.
  1526.  
  1527. Returns
  1528.  
  1529. The rcputi function returns zero on success and EOF on error.
  1530.  
  1531.  
  1532. 1.6.9 The rcputl Function
  1533.  
  1534. Synopsis
  1535.  
  1536.      #include <recio.h>
  1537.      int rcputl(REC *rp, size_t begcol, size_t endcol, long number);
  1538.  
  1539. Description
  1540.  
  1541. The rcputl function writes an integral number from column begcol to column
  1542. endcol of the output record stream pointed to by rp.
  1543.  
  1544. If the number is too large to fit between the columns, asterisks are printed
  1545. between the columns, the callback error function is called, and zero is
  1546. returned.  The error indicator for the record stream is not set.
  1547.  
  1548. If an error occurs, the error indicator for the record stream is set,
  1549. the callback error function is called, and EOF is returned.
  1550.  
  1551. Returns
  1552.  
  1553. The rcputl function returns zero on success and EOF on error.
  1554.  
  1555.  
  1556. 1.6.10 The rcputs Function
  1557.  
  1558. Synopsis
  1559.  
  1560.      #include <recio.h>
  1561.      int rcputs(REC *rp, size_t begcol, size_t endcol, char *string);
  1562.  
  1563. Description
  1564.  
  1565. The rcputs function writes a string of characters from column begcol to
  1566. column endcol of the output record stream pointed to by rp.
  1567.  
  1568. If the string is too large to fit between the columns, a truncated string
  1569. is output, the callback error function is called, and zero is returned.
  1570. The error indicator for the record stream is not set.
  1571.  
  1572. If an error occurs, the error indicator for the record stream is set,
  1573. the callback error function is called, and EOF is returned.
  1574.  
  1575. Returns
  1576.  
  1577. The rcputs function returns zero on success and EOF on error.
  1578.  
  1579.  
  1580. 1.6.11 The rcputui Function
  1581.  
  1582. Synopsis
  1583.  
  1584.      #include <recio.h>
  1585.      int rcputui(REC *rp, size_t begcol, size_t endcol, unsigned int number);
  1586.  
  1587. Description
  1588.  
  1589. The rcputui function writes an unsigned integral number from column begcol to
  1590. column endcol of the output record stream pointed to by rp.
  1591.  
  1592. If the number is too large to fit between the columns, asterisks are printed
  1593. between the columns, the callback error function is called, and zero is
  1594. returned.  The error indicator for the record stream is not set.
  1595.  
  1596. If an error occurs, the error indicator for the record stream is set,
  1597. the callback error function is called, and EOF is returned.
  1598.  
  1599. Returns
  1600.  
  1601. The rcputui function returns zero on success and EOF on error.
  1602.  
  1603.  
  1604. 1.6.12 The rcputul Function
  1605.  
  1606. Synopsis
  1607.  
  1608.      #include <recio.h>
  1609.      int rcputul(REC *rp, size_t begcol, size_t endcol, unsigned long number);
  1610.  
  1611. Description
  1612.  
  1613. The rcputul function writes an unsigned integral number from column begcol to
  1614. column endcol of the output record stream pointed to by rp.
  1615.  
  1616. If the number is too large to fit between the columns, asterisks are printed
  1617. between the columns, the callback error function is called, and zero is
  1618. returned.  The error indicator for the record stream is not set.
  1619.  
  1620. If an error occurs, the error indicator for the record stream is set,
  1621. the callback error function is called, and EOF is returned.
  1622.  
  1623. Returns
  1624.  
  1625. The rcputul function returns zero on success and EOF on error.
  1626.  
  1627.  
  1628.  
  1629. 1.7 Current Position Functions
  1630.  
  1631. 1.7.1 The rbegcolno Function
  1632.  
  1633. Synopsis
  1634.  
  1635.      #include <recio.h>
  1636.      int rbegcolno(REC *rp);
  1637.  
  1638. Description
  1639.  
  1640. The rbegcolno function gets the current setting of the first column number
  1641. in the record for the record stream pointed to by rp.
  1642.  
  1643. Returns
  1644.  
  1645. The rbegcolno function returns 0 if column numbering starts with zero or
  1646. 1 if column numbering starts with one.
  1647.  
  1648.  
  1649. 1.7.2 The rcolno Function
  1650.  
  1651. Synopsis
  1652.  
  1653.      #include <recio.h>
  1654.      size_t rcolno(REC *rp);
  1655.  
  1656. Description
  1657.  
  1658. The rcolno function gets the current column number of the current record
  1659. for the record stream pointed to by rp.
  1660.  
  1661. Returns
  1662.  
  1663. The rcolno function returns the current column number of the current record
  1664. for the record stream pointed to by rp.  The rcolno function returns zero
  1665. prior to the reading of the first record.
  1666.  
  1667.  
  1668. 1.7.3 The rflds Function
  1669.  
  1670. Synopsis
  1671.  
  1672.      #include <recio.h>
  1673.      char *rflds(REC *rp);
  1674.  
  1675. Description
  1676.  
  1677. The rflds function gets a pointer to the field buffer associated with
  1678. the record stream pointed to by rp.  The last field read from the current
  1679. record is stored in the field buffer.  The field is terminated by a
  1680. null character.
  1681.  
  1682. Returns
  1683.  
  1684. The rflds function returns a pointer to the field buffer associated with
  1685. the record stream pointed to by rp.
  1686.  
  1687.  
  1688. 1.7.4 The rfldno Function
  1689.  
  1690. Synopsis
  1691.  
  1692.      #include <recio.h>
  1693.      size_t rfldno(REC *rp);
  1694.  
  1695. Description
  1696.  
  1697. The rfldno function gets the number of fields that have been read from
  1698. the current record for the record stream pointed to by rp.
  1699.  
  1700. Returns
  1701.  
  1702. The rfldno function returns the number of fields that have been read from
  1703. the current record for the record stream pointed to by rp.
  1704.  
  1705.  
  1706. 1.7.5 The rnames Function
  1707.  
  1708. Synopsis
  1709.  
  1710.      #include <recio.h>
  1711.      char *rnames(REC *rp);
  1712.  
  1713. Description
  1714.  
  1715. The rnames function gets a pointer to the name of the file associated
  1716. with the record stream pointed to by rp.
  1717.  
  1718. Returns
  1719.  
  1720. The rnames function returns a pointer to the name of the file associated
  1721. with the record stream pointed to by rp.
  1722.  
  1723.  
  1724. 1.7.6 The rgetrec Function
  1725.  
  1726. Synopsis
  1727.  
  1728.      #include <recio.h>
  1729.      char *rgetrec(REC *rp);
  1730.  
  1731. Description
  1732.  
  1733. The rgetrec function gets the next record from the record stream pointed
  1734. to by rp.  The rgetrec function increments the record number, clears the
  1735. field number to zero, resets the column number to rbegcolno(), and returns
  1736. a pointer to the record buffer.
  1737.  
  1738. Record numbering starts at one (1L).  Before the first record in a record
  1739. stream is read into the record buffer, the record number is zero.
  1740.  
  1741. Field numbering starts at one (1).  Before the first field in a record is
  1742. read into the field buffer, the field number is zero.
  1743.  
  1744. Column numbering starts at either zero or one, depending on the setting of
  1745. the rsetbegcolno function.  Column numbering defaults to zero.
  1746.  
  1747. If an error occurs, the error indicator for the record stream is set,
  1748. the callback error function is called (if registered), and the rgetrec
  1749. function returns a null pointer.
  1750.  
  1751. If the end-of-file is reached, the end-of-file indicator for the record
  1752. stream is set and the rgetrec function returns a null pointer.
  1753.  
  1754. Returns
  1755.  
  1756. The rgetrec function returns a pointer to the record buffer if the next
  1757. record was successfully read.  A null pointer is returned on either
  1758. error or end-of-file.
  1759.  
  1760.  
  1761. 1.7.7 The rputrec Function
  1762.  
  1763. Synopsis
  1764.  
  1765.      #include <recio.h>
  1766.      int rputrec(REC *rp);
  1767.  
  1768. Description
  1769.  
  1770. The rputrec function writes the end-of-record newline character to the output
  1771. record stream pointed to by rp.  The rputrec function increments the record
  1772. number, clears the field number to zero, resets the column number to either
  1773. zero or one, depending on the setting of the rsetbegcolno function.
  1774.  
  1775. Record numbering starts at one (1L).  Before the first record in a record
  1776. stream is written, the record number is zero.
  1777.  
  1778. Field numbering starts at one (1).  Before the first field in a record is
  1779. written, the field number is zero.
  1780.  
  1781. Column numbering starts at either zero or one, depending on the setting of
  1782. the rsetbegcolno function.  Column numbering defaults to zero.
  1783.  
  1784. If an error occurs, the error indicator for the record stream is set, the
  1785. callback error function is called, and EOF is returned.
  1786.  
  1787. Returns
  1788.  
  1789. The rputrec function returns zero on success and EOF on error.
  1790.  
  1791.  
  1792. 1.7.8 The rrecs Function
  1793.  
  1794. Synopsis
  1795.  
  1796.      #include <recio.h>
  1797.      char *rrecs(REC *rp);
  1798.  
  1799. Description
  1800.  
  1801. The rrecs function gets a pointer to the record buffer associated with
  1802. the record stream pointed to by rp.  The current record is stored in the
  1803. record buffer.  The record is terminated by a null character.
  1804.  
  1805. Returns
  1806.  
  1807. The rrecs function returns a pointer to the record buffer associated with
  1808. the record stream pointed to by rp.
  1809.  
  1810.  
  1811. 1.7.9 The rrecno Function
  1812.  
  1813. Synopsis
  1814.  
  1815.      #include <recio.h>
  1816.      long rrecno(REC *rp);
  1817.  
  1818. Description
  1819.  
  1820. The rrecno function gets the number of records that have been read from
  1821. the record stream pointed to by rp.
  1822.  
  1823. Returns
  1824.  
  1825. The rrecno function returns the number of records that have been read from
  1826. the record stream pointed to by rp.
  1827.  
  1828.  
  1829. 1.7.10 The rsetbegcolno Function
  1830.  
  1831. Synopsis
  1832.  
  1833.      #include <recio.h>
  1834.      int rsetbegcolno(REC *rp, int colno);
  1835.  
  1836. Description
  1837.  
  1838. The rsetbegcolno function sets the first column number colno for the record
  1839. stream pointed to by rp.  Column numbering can start at either 0 or 1.
  1840.  
  1841. If an error occurs, the error indicator for the record stream is set, the
  1842. callback error function is called (if registered), and the rsetbegcolno
  1843. function returns EOF.
  1844.  
  1845. Returns
  1846.  
  1847. The rsetbegcolno function returns zero if the first column number was
  1848. successfully set, or EOF if any errors were detected.
  1849.  
  1850.  
  1851. 1.7.11 The rsetfldstr Function
  1852.  
  1853. Synopsis
  1854.  
  1855.      #include <recio.h>
  1856.      int rsetfldstr(REC *rp, char *s);
  1857.  
  1858. Description
  1859.  
  1860. The rsetfldstr function copies the string s into the field buffer of the
  1861. record stream pointed to by rp.  Any existing string in the field buffer
  1862. is overwritten.  The field buffer size is increased, if necessary, to
  1863. accommodate the string.
  1864.  
  1865. A side effect of using the rsetfldstr function is that the error and
  1866. end-of-file indicators for the record stream are cleared (provided
  1867. rsetfldstr does not create an error).
  1868.  
  1869. If an error occurs, the error indicator for the record stream is set,
  1870. the callback error function is called (if registered), and the rsetfldstr
  1871. function returns EOF.
  1872.  
  1873. Returns
  1874.  
  1875. The rsetfldstr function returns zero if the string is successfully copied
  1876. into the field buffer, or EOF if any errors were detected.
  1877.  
  1878.  
  1879. 1.7.12 The rsetrecstr Function
  1880.  
  1881. Synopsis
  1882.  
  1883.      #include <recio.h>
  1884.      int rsetrecstr(REC *rp, char *s);
  1885.  
  1886. Description
  1887.  
  1888. The rsetrecstr function copies the string s into the record buffer of the
  1889. record stream pointed to by rp.  Any existing string in the record buffer
  1890. is overwritten.  The record buffer size is increased, if necessary, to
  1891. accommodate the string.
  1892.  
  1893. A side effect of using the rsetrecstr function is that the error and
  1894. end-of-file indicators for the record stream are cleared (provided
  1895. rsetrecstr does not create an error).
  1896.  
  1897. If an error occurs, the error indicator for the record stream is set,
  1898. the callback error function is called (if registered), and the rsetrecstr
  1899. function returns EOF.
  1900.  
  1901. Returns
  1902.  
  1903. The rsetrecstr function returns zero if the string is successfully copied
  1904. into the record buffer, or EOF if any errors were detected.
  1905.  
  1906.  
  1907.  
  1908. 1.8 Error Functions
  1909.  
  1910. 1.8.1 The errno Macro
  1911.  
  1912. Synopsis
  1913.  
  1914.      #include <errno.h>
  1915.  
  1916. Description
  1917.  
  1918. The errno macro "expands to a modifiable lvalue that has type int, the
  1919. value of which is set to a positive error number by several library
  1920. functions." -Section 4.1.3 of ANSI X3.159-1989.
  1921.  
  1922.  
  1923. 1.8.2 The rclearerr Function
  1924.  
  1925. Synopsis
  1926.  
  1927.      #include <recio.h>
  1928.      void rclearerr(REC *rp);
  1929.  
  1930. Description
  1931.  
  1932. The rclearerr function clears the end-of-file and error indicators for
  1933. the record stream pointed to by rp.
  1934.  
  1935. Returns
  1936.  
  1937. The rclearerr function returns no value.
  1938.  
  1939.  
  1940. 1.8.3 The rcxtno Function
  1941.  
  1942. Synopsis
  1943.  
  1944.      #include <recio.h>
  1945.      int rcxtno(REC *rp);
  1946.  
  1947. Description
  1948.  
  1949. The rcxtno function gets the context number from the record stream pointed
  1950. to by rp.  Context numbers can be assigned to a record stream using the
  1951. rsetcxtno function.  A zero context number indicates that the context
  1952. number has not been assigned.  The recin stream returns the macro value
  1953. of RECIN.
  1954.  
  1955. Returns
  1956.  
  1957. The rcxtno function returns the context number from the record stream pointed
  1958. to by rp.
  1959.  
  1960.  
  1961. 1.8.4 The reof Function
  1962.  
  1963. Synopsis
  1964.  
  1965.      #include <recio.h>
  1966.      int reof(REC *rp);
  1967.  
  1968. Description
  1969.  
  1970. The reof function tests the end-of-file indicator for the record stream
  1971. pointed to by rp.
  1972.  
  1973. Returns
  1974.  
  1975. The reof function returns nonzero if and only if the end-of-file indicator
  1976. is set for the record stream pointed to by rp.
  1977.  
  1978.  
  1979. 1.8.5 The rerror Function
  1980.  
  1981. Synopsis
  1982.  
  1983.      #include <recio.h>
  1984.      int rerror(REC *rp);
  1985.  
  1986. Description
  1987.  
  1988. The rerror function tests the error indicator for the record stream
  1989. pointed to by rp.
  1990.  
  1991. Returns
  1992.  
  1993. The rerror function returns nonzero if and only if the error indicator
  1994. is set for the record stream pointed to by rp.
  1995.  
  1996.  
  1997. 1.8.6 The rerrstr Function
  1998.  
  1999. Synopsis
  2000.  
  2001.      #include <recio.h>
  2002.      char *rerrstr(REC *rp);
  2003.  
  2004. Description
  2005.  
  2006. The rerrstr function gets the error message for the record stream pointed
  2007. to by rp.  The text of the error message is implementation dependent.
  2008.  
  2009. Returns
  2010.  
  2011. The rerrstr function returns a pointer to a string containing an error
  2012. message.
  2013.  
  2014.  
  2015. 1.8.7 The risvalid Function
  2016.  
  2017. Synopsis
  2018.  
  2019.      #include <recio.h>
  2020.      int risvalid(REC *rp);
  2021.  
  2022. Description
  2023.  
  2024. The risvalid function tests if rp is a valid pointer to a record stream.
  2025.  
  2026. Returns
  2027.  
  2028. The risvalid function returns a nonzero value if and only if rp is a
  2029. valid pointer to an open record stream.
  2030.  
  2031.  
  2032. 1.8.8 The rsetcxtno Function
  2033.  
  2034. Synopsis
  2035.  
  2036.      #include <recio.h>
  2037.      int rsetcxtno(REC *rp, int cxtno);
  2038.  
  2039. Description
  2040.  
  2041. The rsetcxtno function sets the context number cxtno on the record stream
  2042. pointed to by rp.  Assigning a context number allows a file format to be more
  2043. easily identified in the callback error function.  Negative context numbers
  2044. are reserved; a zero context number indicates an that the context has not
  2045. been assigned.  A macro value RECIN is preassigned to the recin stream.
  2046.  
  2047. If an error occurs, the rsetcxtno function returns EOF.
  2048.  
  2049. Returns
  2050.  
  2051. The rsetcxtno returns zero if the context number was successfully assigned
  2052. to the record stream, or EOF if any errors were detected.
  2053.  
  2054.  
  2055. 1.8.9 The rseterr Function
  2056.  
  2057. Synopsis
  2058.  
  2059.      #include <recio.h>
  2060.      int rseterr(REC *rp, int errnum);
  2061.  
  2062. Description
  2063.  
  2064. The rseterr function sets the global error number errno to the value of
  2065. errnum if the record stream pointed to by rp is null.  If rp points to
  2066. a valid record stream, the rseterr function sets the error indicator on
  2067. the record stream.  The callback error function is called (if registered).
  2068. If the record stream error indicator is already set on entry to the rseterr
  2069. function, the rseterr function does nothing.
  2070.  
  2071. Returns
  2072.  
  2073. The rseterr function returns the error number.  If the callback error
  2074. function corrects the error and clears the error number, the function
  2075. returns zero.
  2076.  
  2077.  
  2078. 1.8.10 The rseterrfn Function
  2079.  
  2080. Synopsis
  2081.  
  2082.      #include <recio.h>
  2083.      void rseterrfn(void(*rerrfn)(REC *rp));
  2084.  
  2085. Description
  2086.  
  2087. The rseterrfn function registers the callback error function rerrfn for the
  2088. record stream pointed to by rp.
  2089.  
  2090. Returns
  2091.  
  2092. The rseterrfn function returns no value.  The callback error function rerrfn
  2093. returns no value.
  2094.  
  2095.  
  2096. 1.8.11 The rstrerror Function
  2097.  
  2098. Synopsis
  2099.  
  2100.      #include <recio.h>
  2101.      char *rstrerror(int errnum);
  2102.  
  2103. Description
  2104.  
  2105. The rstrerror function maps the error number in errnum to an error
  2106. message string.  The error number and the text of the error message
  2107. are implementation dependent.  (To map errno to an error string, use
  2108. the strerror function.)
  2109.  
  2110. Returns
  2111.  
  2112. The rstrerror function returns a pointer to a string containing an
  2113. error message.
  2114.  
  2115.  
  2116.  
  2117. 1.9 Warning Functions
  2118.  
  2119. 1.9.1 The rclearwarn Function
  2120.  
  2121. Synopsis
  2122.  
  2123.      #include <recio.h>
  2124.      void rclearwarn(REC *rp);
  2125.  
  2126. Description
  2127.  
  2128. The rclearwarn function clears the warning indicator for the record stream
  2129. pointed to by rp.
  2130.  
  2131. Returns
  2132.  
  2133. The rclearwarn function returns no value.
  2134.  
  2135.  
  2136. 1.9.2 The rsetwarn Function
  2137.  
  2138. Synopsis
  2139.  
  2140.      #include <recio.h>
  2141.      int rsetwarn(REC *rp, int warnum);
  2142.  
  2143. Description
  2144.  
  2145. The rsetwarn function sets the sets the warning indicator on the record
  2146. stream pointed to by rp.  The callback warning function is called (if
  2147. registered).
  2148.  
  2149. Returns
  2150.  
  2151. The rseterr function returns the warning number.  If the callback warning
  2152. function modifies the warning number, the function returns the modified
  2153. warning number.
  2154.  
  2155.  
  2156. 1.9.3 The rsetwarnfn Function
  2157.  
  2158. Synopsis
  2159.  
  2160.      #include <recio.h>
  2161.      void rsetwarnfn(void(*rwarnfn)(REC *rp));
  2162.  
  2163. Description
  2164.  
  2165. The rsetwarnfn function registers the callback warning function rwarnfn for
  2166. the record stream pointed to by rp.
  2167.  
  2168. Returns
  2169.  
  2170. The rsetwarnfn function returns no value.  The callback warning function
  2171. rwarnfn returns no value.
  2172.  
  2173.  
  2174. 1.9.4 The rstrwarning Function
  2175.  
  2176. Synopsis
  2177.  
  2178.      #include <recio.h>
  2179.      char *rstrwarning(int warnum);
  2180.  
  2181. Description
  2182.  
  2183. The rstrwarning function maps the warning number warnum to an warning
  2184. message string.  The warning number and the text of the warning message
  2185. are implementation dependent.
  2186.  
  2187. Returns
  2188.  
  2189. The rstrwarning function returns a pointer to a string containing an
  2190. warning message.
  2191.  
  2192.  
  2193. 1.9.5 The rwarning Function
  2194.  
  2195. Synopsis
  2196.  
  2197.      #include <recio.h>
  2198.      int rwarning(REC *rp);
  2199.  
  2200. Description
  2201.  
  2202. The rwarning function tests the warning indicator for the record stream
  2203. pointed to by rp.
  2204.  
  2205. Returns
  2206.  
  2207. The rwarning function returns nonzero if and only if the warning indicator
  2208. is set for the record stream pointed to by rp.
  2209.  
  2210.  
  2211. 1.9.6 The rwarnstr Function
  2212.  
  2213. Synopsis
  2214.  
  2215.      #include <recio.h>
  2216.      char *rwarnstr(REC *rp);
  2217.  
  2218. Description
  2219.  
  2220. The rwarnstr function gets the warning message for the record stream pointed
  2221. to by rp.  The text of the warning message is implementation dependent.
  2222.  
  2223. Returns
  2224.  
  2225. The rwarnstr function returns a pointer to a string containing an warning
  2226. message.
  2227.  
  2228.  
  2229.  
  2230. 2.0 PORTABILITY ISSUES
  2231.  
  2232. The first six characters of this function are common to another function.
  2233. Ref 3.1.2 of ANSI X3.159-1989.  (1.2.1, 1.2.2, 1.2.4, 1.3.3, 1.3.4, 1.3.13,
  2234. 1.5.1-1.5.4, 1.5.11, 1.5.12, 1.7.11, 1.8.9, 1.8.10, 1.9.2, 1.9.3)
  2235.  
  2236.  
  2237.  
  2238. 3.0 REFERENCES
  2239.  
  2240. 1. ANSI X3.159-1989.  American National Standard for Information Systems -
  2241.    Programming Language - C.  American National Standards Institute,
  2242.    11 West 42nd Street, New York, NY 10036, 1990.
  2243.  
  2244.  
  2245. 4.0 INDEX
  2246.  
  2247. errno macro ............ 1.8.1
  2248. FLDBUFSIZ macro ........ 1.1.3, 1.2.4
  2249. rbegcolno function ..... 1.7.1, 1.7.6
  2250. rbgeti function ........ 1.3.1
  2251. rbgetl function ........ 1.3.2
  2252. rbgetui function ....... 1.3.3
  2253. rbgetul function ....... 1.3.4
  2254. rbputi function ........ 1.4.1
  2255. rbputl function ........ 1.4.2
  2256. rbputui function ....... 1.4.3
  2257. rbputul function ....... 1.4.4
  2258. rcbgeti function ....... 1.5.1
  2259. rcbgetl function ....... 1.5.2
  2260. rcbgetui function ...... 1.5.3
  2261. rcbgetul function ...... 1.5.4
  2262. rcbputi function ....... 1.7.1
  2263. rcbputl function ....... 1.7.2
  2264. rcbputui function ...... 1.7.3
  2265. rcbputul function ...... 1.7.4
  2266. rcgetc function ........ 1.5.5
  2267. rcgetd function ........ 1.5.6
  2268. rcgetf function ........ 1.5.7
  2269. rcgeti function ........ 1.5.8
  2270. rcgetl function ........ 1.5.9
  2271. rcgets function ........ 1.5.10
  2272. rcgetui function ....... 1.5.11
  2273. rcgetul function ....... 1.5.12
  2274. rclearerr function ..... 1.8.2
  2275. rclearwarn function .... 1.9.1
  2276. rclose function ........ 1.2.1
  2277. rcloseall function ..... 1.2.2
  2278. rcolno function ........ 1.7.2
  2279. rcputc function ........ 1.7.5
  2280. rcputd function ........ 1.7.6
  2281. rcputf function ........ 1.7.7
  2282. rcputi function ........ 1.7.8
  2283. rcputl function ........ 1.7.9
  2284. rcputs function ........ 1.7.10
  2285. rcputui function ....... 1.7.11
  2286. rcputul function ....... 1.7.12
  2287. rcxtno function ........ 1.8.3
  2288. REC object ............. 1.1.2
  2289. recin expression ....... 1.1.4
  2290. RECBUFSIZ macro ........ 1.1.3, 1.2.5
  2291. RECFLDCH macro ......... 1.1.3, 1.3.13
  2292. RECTXTCH macro ......... 1.1.3, 1.3.14
  2293. reof function .......... 1.8.4
  2294. rerror function ........ 1.8.5
  2295. rerrstr function ....... 1.8.6
  2296. rflds function ......... 1.7.3
  2297. rfldno function ........ 1.7.4
  2298. rgetc function ......... 1.3.5
  2299. rgetd function ......... 1.3.6
  2300. rgetf function ......... 1.3.7
  2301. rgeti function ......... 1.3.8
  2302. rgetl function ......... 1.3.9
  2303. rgetrec function ....... 1.7.6
  2304. rgets function ......... 1.3.10
  2305. rgetui function ........ 1.3.11
  2306. rgetul function ........ 1.3.12
  2307. risvalid function ...... 1.8.7
  2308. rnames function ........ 1.7.5
  2309. ropen function  ........ 1.2.3
  2310. ROPEN_MAX macro ........ 1.1.3
  2311. rputc function ......... 1.4.5
  2312. rputd function ......... 1.4.6
  2313. rputf function ......... 1.4.7
  2314. rputi function ......... 1.4.8
  2315. rputl function ......... 1.4.9
  2316. rputrec function ....... 1.7.7
  2317. rputs function ......... 1.4.10
  2318. rputui function ........ 1.4.11
  2319. rputul function ........ 1.4.12
  2320. rrecs function ......... 1.7.8
  2321. rrecno function ........ 1.7.9
  2322. rsetbegcolno function .. 1.7.6, 1.7.10
  2323. rsetcxtno function ..... 1.8.8
  2324. rseterr function ....... 1.8.9
  2325. rseterrfn function ..... 1.8.10
  2326. rsetfldch function ..... 1.3.13
  2327. rsetfldsiz function .... 1.2.4
  2328. rsetfldstr function .... 1.7.11
  2329. rsetrecsiz function .... 1.2.5
  2330. rsetrecstr function .... 1.7.12
  2331. rsettxtch function ..... 1.3.14
  2332. rsetwarn function ...... 1.9.2
  2333. rsetwarnfn function .... 1.9.3
  2334. rskipfld function  ..... 1.3.15
  2335. rskipnfld function ..... 1.3.16
  2336. rstrerror function ..... 1.8.11
  2337. rstrwarning function ... 1.9.4
  2338. rwarning function ...... 1.9.5
  2339. rwarnstr function ...... 1.9.6
  2340.